Add feedback form override component and host sample#5818
Open
ok-AK wants to merge 3 commits intomicrosoft:mainfrom
Open
Add feedback form override component and host sample#5818ok-AK wants to merge 3 commits intomicrosoft:mainfrom
ok-AK wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a host hook to override Web Chat’s native feedback form UI while keeping the built-in thumbs up/down behavior, plus a sample and test coverage for the override flow.
Changes:
- Introduces
styleOptions.renderFeedbackFormOverrideComponent(and exported context type) and wires it intoActivityFeedback. - Hardens feedback action selection/submission when actions are missing
@id. - Adds a new hosted sample and html2 tests validating inline override, submit, dismiss, and “change mind” scenarios.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| samples/05.custom-components/h.feedback-form/index.html | New hosted sample showing an inline override host component. |
| samples/05.custom-components/h.feedback-form/README.md | Documentation for the new sample and override pattern. |
| packages/component/src/ActivityFeedback/providers/ActivityFeedbackComposer.tsx | Adds @id guards and adjusts action state handling/typing. |
| packages/component/src/ActivityFeedback/ActivityFeedback.tsx | Implements rendering logic for the feedback form override component. |
| packages/api/src/index.ts | Exports the new context type from the public API surface. |
| packages/api/src/defaultStyleOptions.ts | Adds default value for renderFeedbackFormOverrideComponent. |
| packages/api/src/StyleOptions.ts | Documents and types the new style option and its context. |
| tests/html2/feedbackForm/feedback.form.middleware.inline*.html | Adds html2 tests covering override submit and dismiss/change-mind flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Entry
renderFeedbackFormOverrideComponentstyle option to allow host applications to provide custom feedback form components, in PR #5818styleOptions.renderFeedbackFormOverrideComponentDescription
Adds simple conditional mount native or mount custom feedback form.
Allows the host to override feedback form and replace it with a host provided custom feedback form.
Host will continue using the existing thumbs up/down voting buttons per activity to trigger feedback form mount.
Prime example is shown below. In this example, the host is forced to use a 3rd party library that emits a Dialog that collects feedback. The E2E test has been slowed down so that we can see the dialog taking effect.
Design
NA
Specific Changes
NA
CHANGELOG.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed